ExpressionEngine: Why is this {exp:query} tag producing an error?
        Posted  
        
            by Josh Brown
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Josh Brown
        
        
        
        Published on 2010-05-03T03:25:04Z
        Indexed on 
            2010/05/03
            16:58 UTC
        
        
        Read the original article
        Hit count: 438
        
Hi.
I have this code in place to pull some relation data from the database based on a ID of another weblog entry. The relationship custom field would not work for my situation. I have tested the SQL with MySQL and get no errors. But I get an error when I pull up the page.
{exp:query sql="SELECT entry_id,field_id_16,field_id_19 FROM exp_weblog_data WHERE field_id_15='2' AND weblog_id='6'"}
Also, I want to populate the “field_id_15” from the url. I have tried using the “segment_*” tag, but nothing. Maybe it is something else.
Any help is greatly appreciated.
Thanks, Josh
© Stack Overflow or respective owner